package com.yk.controller;

import lombok.SneakyThrows;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope
public class FlowLimitController {

    @SneakyThrows
    @GetMapping("/testA")
    public String testA() {
        Thread.sleep(900);
        return "testA";
    }

    @GetMapping("/testB")
    public String testB() throws InterruptedException {
        return "testB";
    }
    @SneakyThrows
    @GetMapping("/testD")
    public String testD() {
        Thread.sleep(1000);
        return "testD";
    }
}
